<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="../common/base_body_header.jsp" %>
<%@include file="../common/navbar.jsp" %>
<%@include file="../common/page_content_pre.jsp" %>

<link rel="stylesheet" href="${GLOBAL.staticJsPath}/assets/qiniu/fileupload.css"/>

<div class="page-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="widget-box">
                <div class="widget-header">
                    <h4>小区详情</h4>
                </div>
                <div class="widget-body">
                    <div class="widget-main no-padding">
                        <form:form class="form-horizontal" modelAttribute="neighborhood">
                            <fieldset>
                                <div class="form-group">

                                    <span class="col-sm-3 control-label">区域：</span>
                                    <label class="control-label">${neighborhood.districtName}</label>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <span class="col-sm-3 control-label">楼盘名称：</span>
                                    <label class="control-label">${neighborhood.nbhName}</label>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <span class="col-sm-3 control-label">楼盘地址：</span>
                                    <label class="control-label">${neighborhood.address}</label>

                                </div>
                            </fieldset>
                            <hr>
                            <div class="form-group">
                                <label class="col-sm-3 control-label"><h4>楼盘基本信息</h4></label>
                            </div>

                            <fieldset>
                                <div class="form-group">
                                    <span class="col-sm-3 control-label">建筑年代：</span>
                                    <label class="control-label">${neighborhood.buildingYears}</label>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <span class="col-sm-3 control-label">开发公司：</span>
                                    <label class="control-label">${neighborhood.developmentCompany}</label>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <span class="col-sm-3 control-label">物业公司：</span>
                                    <label class="control-label">${neighborhood.propertyManager}</label>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <span class="col-sm-3 control-label">物业费：</span>
                                    <label class="control-label">${neighborhood.propertyFee}</label>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <span class="col-sm-3 control-label">建筑类型：</span>
                                    <label class="control-label">${neighborhood.buildingType}</label>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <span class="col-sm-3 control-label">总栋数：</span>
                                    <label class="control-label">${neighborhood.buildingTotal}</label>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <span class="col-sm-3 control-label">已录入栋数：</span>
                                    <label class="control-label">${neighborhood.buildingInput}</label>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <span class="col-sm-3 control-label">总户数：</span>
                                    <label class="control-label">${neighborhood.residenters}</label>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <span class="col-sm-3 control-label">产权年限：</span>
                                    <label class="control-label">${neighborhood.ageLimit}</label>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <span class="col-sm-3 control-label">车位状况：</span>
                                    <label class="control-label">${neighborhood.parkingCondition}</label>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <span class="col-sm-3 control-label">绿化率：</span>
                                    <label class="control-label">${neighborhood.greeningRate}</label>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <span class="col-sm-3 control-label">总占地：</span>
                                    <label class="control-label">${neighborhood.totalArea}</label>
                                </div>
                            </fieldset>
                            <fieldset>
                                <div class="form-group">
                                    <span class="col-sm-3 control-label">创建时间：</span>
                                    <label class="control-label">${neighborhood.createDate}</label>
                                </div>
                            </fieldset>
                            <hr/>

                            <fieldset>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">小区图片：</label>

                                    <div class="col-sm-6">
                                        <c:if test="${photoList!= null || fn:length(photoList) == 0}">
                                            <c:forEach items="${photoList}" var="item" varStatus="plist">
                                                <div id="${item.photoUrl}-id" class="col-xs-4"><img
                                                        id="${item.photoUrl}"
                                                        src="${storeUrl}${item.photoUrl}">

                                                    <div class="q-label"><input value="${item.photoDesc}"></div>
                                                </div>
                                            </c:forEach>
                                        </c:if>
                                    </div>
                                </div>
                            </fieldset>

                            <fieldset>
                                <div class="form-group">
                                    <div id="imageUploadContainer">
                                    </div>
                                    <div id="upload_file_container"></div>
                                </div>
                            </fieldset>

                            <div class="form-actions center">
                                <button type="button" class="btn btn-sm btn-grey" id="go_back_btn">
                                    返回
                                    <i class="icon-reply icon-on-right bigger-110"></i>
                                </button>
                            </div>
                        </form:form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<%@include file="../common/page_content_suf.jsp" %>
<%@include file="../common/script.jsp" %>
<script>
    $(document).ready(function () {
        $("#go_back_btn").on("click", function () {
            goBack();
        });
    });

    function goBack() {
        document.location.href = "${GLOBAL.basePath}/neighborhood/list";
    }
</script>

